/*
 * File.h
 *
 *  Created on: May 6, 2012
 *      Author: miro
 */

#ifndef FILE_H_
#define FILE_H_
#include <vector>
#include <string>
#include <sstream>
#include <iostream>
#include "symbolChecker.h"
#include "Line.h"
using namespace counter;
#include <sstream>
#include <stdlib.h>
using namespace std;

class FileValidation {
public:
	FileValidation();
	virtual ~FileValidation();
	symbolChecker *simbolCheck;
	std::vector<Line*> myarray;
	vector<Line*> readFromFile(char fileName[]);


private:
	bool isComment(string line);
	Line* getLine(string line , int LineNumber);
	bool checkLabel(string label);
	bool checkOperand(string operand);
	bool checkOperation(string operation);
	string getError(string label , string operand , string operation);
	int getFormat(string operation);
	bool checkStartString(string variable);
	bool checkStartLine(vector<string> line);
	bool checkEqual( string str1, string str2);
	bool isInteger(string operand);
	bool isVariableType(string s);
	bool hasCommentField(vector<string> line);
	string getErrorString(string operand , string label , string operation , int lineNumber);
	string stringToUpper(string str);

};

#endif /* FILE_H_ */
